package com.ftg.midamall.admin.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ftg.midamall.admin.entity.UmsRole;
import com.ftg.midamall.admin.entity.UmsRoleMenu;
import io.swagger.models.auth.In;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author qjw
 * @version 1.0
 * @date 2023/10/25 21:57
 */
@Mapper
public interface UmsRoleMenuMapper extends BaseMapper<UmsRoleMenu> {

    @Delete("delete from ums_role_menu_relation where role_id=#{role_id}")
    int delRole(@Param("role_id") Long role_id);


    /**
     * 插入角色菜单关系表
     * @param role_id
     * @param menu_id
     * @return
     */

    int insertRoleMenuRelation(@Param("role_id") Long role_id, @Param("menu_id") Long menu_id);

    List<Integer> selectMenuIdsByRoleId(@Param("role_id") Long role_id);











}
